package com.supplychainapi.domain;

import com.supplychainapi.model.ScmTbsupplierlvl;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.List;

@ApiModel("新增修改之前参数获取")
public class BeforeDataModel<T> {
    @ApiModelProperty("是否自动编码")
    private boolean isAuto;

    @ApiModelProperty("编码")
    private String code;

    @ApiModelProperty("更新的话 具体的model")
    private T model;

    @ApiModelProperty("增值税率")
    private List<IncrementRate> incrementRate;

//    @ApiModelProperty("供应商评级等级")
//    private List<ScmTbsupplierlvl> supplierlvl;

    public boolean isAuto() {
        return isAuto;
    }

    public void setAuto(boolean auto) {
        isAuto = auto;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public T getModel() {
        return model;
    }

    public void setModel(T model) {
        this.model = model;
    }

    public BeforeDataModel(boolean isAuto, String code, T model) {
        this.isAuto = isAuto;
        this.code = code;
        this.model = model;
    }

    public BeforeDataModel(boolean isAuto, String code, T model, List<IncrementRate> incrementRate) {
        this.isAuto = isAuto;
        this.code = code;
        this.model = model;
        this.incrementRate = incrementRate;
    }

	/*public List<ScmTbsupplierlvl> getSupplierlvl() {
        return supplierlvl;
	}

	public void setSupplierlvl(List<ScmTbsupplierlvl> supplierlvl) {
		this.supplierlvl = supplierlvl;
	}*/

    public BeforeDataModel(boolean isAuto, String code, T model, List<IncrementRate> incrementRate, List<ScmTbsupplierlvl> supplierlvl) {
        this.isAuto = isAuto;
        this.code = code;
        this.model = model;
        this.incrementRate = incrementRate;
        //this.supplierlvl=supplierlvl;
    }

    public static final <TT> BeforeDataModel build(boolean isAuto, String code, TT model, List<IncrementRate> incrementRate) {
        return new BeforeDataModel(isAuto, code, model, incrementRate);
    }

    public static final <TT> BeforeDataModel build(boolean isAuto, String code, TT model, List<IncrementRate> incrementRate, List<ScmTbsupplierlvl> supplierlvl) {
        return new BeforeDataModel(isAuto, code, model, incrementRate, supplierlvl);
    }

    public static final <TT> BeforeDataModel build(boolean isAuto, String code, TT model) {
        return new BeforeDataModel(isAuto, code, model);
    }

    public List<IncrementRate> getIncrementRate() {
        return incrementRate;
    }

    public void setIncrementRate(List<IncrementRate> incrementRate) {
        this.incrementRate = incrementRate;
    }
    
}
